package com.kingsailor.gunsmith.security;

/**
 * @author xulixin
 */
public interface UserAccessControlService {

    void doLoginCheck(String username, String password, boolean rememberMe) throws Exception;

    boolean hasLoggedIn();

    Object getCurrentUser();

    boolean hasRole(String roleName);

    boolean hasAnyRole(String... roleNames);

    boolean hasPermission(String permissionToken);

    void setEncryptPassword(BaseAppUser user);

    boolean verifyPassword(BaseAppUser user, String password);

    int countOnlineUser();

    boolean hasAdminRole();

    LoginUserAccessor getLoginUserAccessor();
}
